home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / mint / lib / mlib41d.zoo / diffc next >
Text File  |  1993-11-01  |  25KB  |  835 lines

  1. *** 40.1    1993/10/30 08:59:36
  2. --- nlist.c    1993/10/31 09:10:58
  3. ***************
  4. *** 31,37 ****
  5.       if( !symread )
  6.       {
  7.           symread=min(sizeof(symbuf),symcount);
  8. !         if(symread!=read(sym_fd,symbuf,symread))
  9.           {
  10.               close(sym_fd);
  11.                           symread=0;
  12. --- 31,37 ----
  13.       if( !symread )
  14.       {
  15.           symread=min(sizeof(symbuf),symcount);
  16. !         if((int)symread != read(sym_fd,symbuf, (int)symread))
  17.           {
  18.               close(sym_fd);
  19.                           symread=0;
  20. ***************
  21. *** 76,82 ****
  22.       if( ( sym_fd=open(file,O_RDONLY) ) == -1 ) return -1;            
  23.   
  24.       /* Read in file header */
  25. !     read(sym_fd,&hbuf,sizeof(hbuf));
  26.   
  27.       /* Executable file ? */
  28.       if(A_BADMAG(hbuf)) 
  29. --- 76,82 ----
  30.       if( ( sym_fd=open(file,O_RDONLY) ) == -1 ) return -1;            
  31.   
  32.       /* Read in file header */
  33. !     read(sym_fd,&hbuf,(int) sizeof(hbuf));
  34.   
  35.       /* Executable file ? */
  36.       if(A_BADMAG(hbuf)) 
  37. ***************
  38. *** 87,93 ****
  39.       }
  40.   
  41.       /* Any symbols? */
  42. !     if( !(symcount=hbuf.a_syms) )
  43.       {
  44.           errno=EDOM;
  45.           return -1;
  46. --- 87,93 ----
  47.       }
  48.   
  49.       /* Any symbols? */
  50. !     if((symcount=hbuf.a_syms) == 0)
  51.       {
  52.           errno=EDOM;
  53.           return -1;
  54. *** 40.1    1993/10/30 08:59:36
  55. --- qsort.c    1993/10/31 08:56:30
  56. ***************
  57. *** 21,37 ****
  58.   #include <string.h>
  59.   #include <memory.h>
  60.   
  61.   #ifdef __GNUC__
  62.   #  ifdef minix
  63.        void *alloca(unsigned long);
  64.        typedef unsigned long size_t;
  65.   #  endif
  66. ! #  define INLINE inline
  67.   #else
  68.   #  define INLINE /* */
  69. - #endif
  70. - #ifndef _COMPILER_H
  71. - #include <compiler.h>
  72.   #endif
  73.   
  74.   /* macros for incrementing/decrementing void pointers */
  75. --- 21,42 ----
  76.   #include <string.h>
  77.   #include <memory.h>
  78.   
  79. + #ifndef _COMPILER_H
  80. + #include <compiler.h>
  81. + #endif
  82.   #ifdef __GNUC__
  83.   #  ifdef minix
  84.        void *alloca(unsigned long);
  85.        typedef unsigned long size_t;
  86.   #  endif
  87. ! #  ifdef __GNUC_INLINE__
  88. ! #    define INLINE    inline
  89. ! #  else
  90. ! #    define INLINE    /* */
  91. ! #  endif
  92.   #else
  93.   #  define INLINE /* */
  94.   #endif
  95.   
  96.   /* macros for incrementing/decrementing void pointers */
  97. *** 40.1    1993/10/30 08:59:36
  98. --- strerror.c    1993/10/31 11:24:54
  99. ***************
  100. *** 96,106 ****
  101.       "range error",                /* 88 */
  102.       "domain error",                /* 89 */
  103.       "I/O error",                /* 90 */
  104. !     "disk full"                /* 91 */
  105.       };
  106.   
  107.   int    sys_nerr = (int)(sizeof(sys_errlist)/sizeof(sys_errlist[0]));
  108.   
  109.   /*
  110.    * strerror - map error number to descriptive string
  111.    *
  112. --- 96,160 ----
  113.       "range error",                /* 88 */
  114.       "domain error",                /* 89 */
  115.       "I/O error",                /* 90 */
  116. !     "disk full",                /* 91 */
  117. !     nullstr,                /* 92 */
  118. !     nullstr,                /* 93 */
  119. !     nullstr,                /* 94 */
  120. !     nullstr,                /* 95 */
  121. !     nullstr, nullstr, nullstr, nullstr, nullstr,    /* 96 - 100 */
  122. !     nullstr, nullstr, nullstr, nullstr, nullstr,    /* 101 - 105 */
  123. !     nullstr, nullstr, nullstr, nullstr, nullstr,    /* 106 - 110 */
  124. !     nullstr, nullstr, nullstr, nullstr, nullstr,    /* 111 - 115 */
  125. !     nullstr, nullstr, nullstr, nullstr, nullstr,    /* 116 - 120 */
  126. !     nullstr, nullstr, nullstr, nullstr, nullstr,    /* 121 - 125 */
  127. !     nullstr,                /* 126 */
  128. !     nullstr,                /* 127 */
  129. !     "interrupted system call"        /* 128 */
  130.       };
  131.   
  132.   int    sys_nerr = (int)(sizeof(sys_errlist)/sizeof(sys_errlist[0]));
  133.   
  134. + #ifdef __MINT__
  135. + /* Support for Kay Roemer's socket library */
  136. + char *_sock_errlist[] = {
  137. +     "Socket operation on non-socket",        /* 300 */
  138. +     "Destination address required",
  139. +     "Message too long",
  140. +     "Protocol wrong type for socket",
  141. +     "Protocol not available",
  142. +     "Protocol not supported",
  143. +     "Socket type not supported",
  144. +     "Operation not supported",
  145. +     "Protocol family not supported",
  146. +     "Address family not supported by protocol",
  147. +     "Address already in use",
  148. +     "Cannot assign requested address",
  149. +     "Network is down",
  150. +     "Network is unreachable",
  151. +     "Network dropped conn. because of reset",
  152. +     "Software caused connection abort",
  153. +     "Connection reset by peer",
  154. +     "Socket is already connected",
  155. +     "Socket is not connected",
  156. +     "Cannot send after shutdown",
  157. +     "Connection timed out",
  158. +     "Connection refused",
  159. +     "Host is down",
  160. +     "No route to host",
  161. +     "Operation already in progress",
  162. +     "Operation now in progress",
  163. +     "Operation would block"
  164. + };
  165. + int    _sock_nerr = (int)(sizeof (_sock_errlist) / sizeof (char *));
  166. + #define MINSOCKERR    300
  167. + #define MAXSOCKERR    (MINSOCKERR + _sock_nerr)
  168. + #endif
  169.   /*
  170.    * strerror - map error number to descriptive string
  171.    *
  172. ***************
  173. *** 115,120 ****
  174. --- 169,178 ----
  175.   
  176.       if (errnum >= 0 && errnum < sys_nerr)
  177.           return(sys_errlist[errnum]);
  178. + #ifdef __MINT__
  179. +     else if (errnum >= MINSOCKERR && errnum < MAXSOCKERR)
  180. +         return(_sock_errlist[errnum - MINSOCKERR]);
  181. + #endif
  182.       else
  183.           return(nullstr);
  184.   }
  185. *** 40.1    1993/10/30 08:59:36
  186. --- utime.c    1993/10/31 09:11:24
  187. ***************
  188. *** 135,141 ****
  189.       date = (int) (dtime & 0xffff);
  190.       time = (int) (dtime >> 16) & 0xffff;
  191.   
  192. !     if ((r = Tsetdate(date)) || (r = Tsettime(time))) {
  193.           errno = r == -1 ? EBADARG : (int) -r;
  194.           return -1;
  195.       }
  196. --- 135,141 ----
  197.       date = (int) (dtime & 0xffff);
  198.       time = (int) (dtime >> 16) & 0xffff;
  199.   
  200. !     if (((r = Tsetdate(date)) != 0) || ((r = Tsettime(time)) != 0)) {
  201.           errno = r == -1 ? EBADARG : (int) -r;
  202.           return -1;
  203.       }
  204. *** 40.1    1993/10/30 08:59:36
  205. --- wcmb.c    1993/10/31 09:11:26
  206. ***************
  207. *** 31,37 ****
  208.       
  209.       if(mbstr == NULL) mbstr = "";
  210.       
  211. !     while(revcnt && (*wstr++ = *mbstr++)) revcnt--;
  212.       
  213.       return maxlen - revcnt;
  214.   }
  215. --- 31,37 ----
  216.       
  217.       if(mbstr == NULL) mbstr = "";
  218.       
  219. !     while(revcnt && ((*wstr++ = *mbstr++) != 0)) revcnt--;
  220.       
  221.       return maxlen - revcnt;
  222.   }
  223. ***************
  224. *** 62,68 ****
  225.       
  226.       if(wstr == NULL) wstr = _wnull; /* Better avoid L"". */
  227.       
  228. !     while(revcnt && (*mbstr++ = (char) *wstr++)) revcnt--;
  229.       
  230.       return maxlen - revcnt;
  231.   }
  232. --- 62,68 ----
  233.       
  234.       if(wstr == NULL) wstr = _wnull; /* Better avoid L"". */
  235.       
  236. !     while(revcnt && ((*mbstr++ = (char) *wstr++) != 0)) revcnt--;
  237.       
  238.       return maxlen - revcnt;
  239.   }
  240. *** 40.1    1993/10/30 08:59:36
  241. --- wcscat.c    1993/10/31 09:11:30
  242. ***************
  243. *** 19,25 ****
  244.       {
  245.           for (dscan = dst; *dscan; dscan++)
  246.           continue;
  247. !         while ((*dscan++ = *sscan++))
  248.               continue;
  249.       }
  250.       return(dst);
  251. --- 19,25 ----
  252.       {
  253.           for (dscan = dst; *dscan; dscan++)
  254.           continue;
  255. !         while ((*dscan++ = *sscan++) != 0)
  256.               continue;
  257.       }
  258.       return(dst);
  259. ***************
  260. *** 43,49 ****
  261.           for (dscan = dst; *dscan; dscan++)
  262.           continue;
  263.           count = n;
  264. !         while ((c = *sscan++) && --count >= 0)
  265.           *dscan++ = c;
  266.           *dscan = 0;
  267.       }
  268. --- 43,49 ----
  269.           for (dscan = dst; *dscan; dscan++)
  270.           continue;
  271.           count = n;
  272. !         while (((c = *sscan++) != 0) && --count >= 0)
  273.           *dscan++ = c;
  274.           *dscan = 0;
  275.       }
  276. *** 40.1    1993/10/30 08:56:04
  277. --- Changelog    1993/11/01 22:31:34
  278. ***************
  279. *** 4,9 ****
  280. --- 4,144 ----
  281.   Changes are listed in *reverse* order, most recent changes being
  282.   first.
  283.   
  284. + PATCHLEVEL41::
  285. + ***** nlist.c
  286. + ----------------------------
  287. + revision 40.2    
  288. + date: 1993/10/31 09:24:14;  author: hohmuth;  state: Exp;  lines: +3 -3
  289. + add a few typecasts for __MSHORT__
  290. + =============================================================================
  291. + ***** qsort.c
  292. + ----------------------------
  293. + revision 40.2    
  294. + date: 1993/10/31 08:58:56;  author: jrb;  state: Exp;  lines: +9 -4
  295. + adjust order of inclusion of compiler.h so that INLINE may be
  296. + conditionally overriden even when __GNUC__
  297. + =============================================================================
  298. + ***** strerror.c
  299. + ----------------------------
  300. + revision 40.2    
  301. + date: 1993/10/31 11:33:36;  author: entropy;  state: Exp;  lines: +59 -1
  302. + Add support for the socket lib.
  303. + =============================================================================
  304. + ***** utime.c
  305. + ----------------------------
  306. + revision 40.2    
  307. + date: 1993/10/31 09:25:04;  author: hohmuth;  state: Exp;  lines: +1 -1
  308. + make assignments used as truth values clearer, to avoid
  309. + spurious warnings
  310. + =============================================================================
  311. + ***** wcmb.c
  312. + ----------------------------
  313. + revision 40.2    
  314. + date: 1993/10/31 09:25:16;  author: hohmuth;  state: Exp;  lines: +2 -2
  315. + make assignments used as truth values clearer, to avoid
  316. + spurio